<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<base href="<%=basePath%>">
	<title>${user.login_name } 的主页  - SegmentFault</title>
	<jsp:include page="../common/_meta.jsp"></jsp:include>
</head>
<body>
	<jsp:include page="../common/_header.jsp"></jsp:include>
	<div class="wrap">
		<div class="inner edge">
		    <div class="detail" id="user-detail">
		        <div class="d-card">
		            <a href="u/${user.id }">
						<img class="big-avatar-img" src="${user.head_photo }" alt="${user.login_name } ">
					</a>
		            <h1>
		                ${user.login_name } <span class="quick-action hidden"></span>
		            </h1>
		            <div class="excerpt">
		            	<div>${user.signature }</div>
		            </div>
		        </div>
		        <div class="d-action">
					<ul class="hor-count">
		                <li><strong>${user.liveness }</strong>活跃度</li>
		                <li class="followers"><strong>${user.contributio }</strong>贡献度</li>
		            </ul>
		        </div>
		    </div><!-- end #tag-detail -->
		
		    <div id="main">
		        <div class="subhead">
		            <h1 class="subtitle">${uAnswerCount }个回答</h1>
		            <span class="right"><a href="u/${user.id }">← 返回个人主页</a></span>
		        </div><!-- end .subhead -->
		        <div id="user-answer">
		        	<c:choose>
		        		<c:when test="${not empty uAnswerList }">
		        			<c:forEach var="uAnswer" items="${uAnswerList }">
		        				<article class="post" id="${uAnswer.id }">
		        					<div class="post-big-vote">
										<span>${uAnswer.jack_num }</span>顶
						        	</div>
						        	<div class="p-summary">
						        		<div class="p-excerpt">
						        			${uAnswer.content }
						        			<a href="q/${uAnswer.id }#${uAnswer.quest_id }" class="readmore">阅读全部</a>
						        		</div>
						        	</div>
		        				</article>
		        			</c:forEach>
		        			<jsp:include page="../common/_page.jsp"></jsp:include>
		        		</c:when>
		        		<c:otherwise>
		        			<article class="post">暂时没有回答</article>
		        		</c:otherwise>
		        	</c:choose>
				</div><!-- end #user-answer -->
		    </div><!-- end #main -->
		
		    <div id="secondary">
		        <aside class="box">
		            <h3>用户统计</h3>
		            <ul class="link-list user-status">
		                <li>${uTimeGo }加入</li>
		                <li>最近登录时间：</li>
		                <li>${user.recent_login_time }</li>
		            </ul>
		        </aside>    
			</div><!-- end #secondary -->
		</div>
	</div><!-- end .wrap -->	

	<jsp:include page="../common/_footer.jsp"></jsp:include>
</body>
</html>